package ipaintplugin.objects;

import java.util.Vector;

import org.eclipse.swt.graphics.GC;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;

public class Group extends Figure {

	private Vector<Figure> figures = new Vector<Figure>();
	
	public Group() {
		
	}
	
	
	
	public void addFigure(Figure fig) {
		figures.add(fig);
	}
	
	public Figure getFigure(int index) {
		if(index < 0 || index >= figures.size())
			return null;
		return figures.get(index);
	}
	
	public void removeFigure(Figure fig) {
		figures.remove(fig);
	}
	
	@Override
	public void fromXML(Node el) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void draw(GC canvas) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void toXML(Document doc, Element el) {
		// TODO Auto-generated method stub
		
	}



	@Override
	public String getTagName() {
		return "group";
	}



	@Override
	public Object clone() {
		// TODO Auto-generated method stub
		return new Group();
	}

}
